# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-overrides
pkgver=7.7.0
pkgrel=2
pkgdesc="Decorator to automatically detect mismatch when overriding a method"
url="https://github.com/mkorpela/overrides"
arch="noarch"
license="Apache-2.0"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mkorpela/overrides/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/overrides-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
66b8fd914810b29347deb32b991bc7a57e8b4d2b6b4da4c744d2d071eedd96f067a26beeaad7d936acaa71c355ca058abe26caff263313c8f5c16f39731a726f  py3-overrides-7.7.0.tar.gz
"
